package com.dangdang.sharding.dp.filter;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.dangdang.sharding.dp.filter.dp.Request;
import com.dangdang.sharding.dp.filter.dp.Response;
import com.dangdang.sharding.dp.filter.dp.service.MyController;
import com.dangdang.sharding.dp.filter.dp.service.BizController;
import com.dangdang.sharding.dp.filter.spring.config.FilterConfig;

public class Test {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext ac=new AnnotationConfigApplicationContext(FilterConfig.class);

		String msg = "<html>敏感字眼</html>";

		Request request = new Request();
		request.setRequestStr(msg);
		Response response = new Response();
		response.setResponseStr("response my------------");

		MyController myController = ac.getBean(MyController.class);
		myController.doGet(request, response);
		
		String msg1 = "<html><div>敏感的哈哈</div>敏感字眼</html>";
		Request request1 = new Request();
		request1.setRequestStr(msg1);
		Response response1 = new Response();
		response1.setResponseStr("response user------------");
		BizController userController = ac.getBean(BizController.class);
		userController.doGet(request1, response1);
	}

}